package com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.dto.BusinessLaboratoryListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.param.BusinessLaboratoryCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.param.BusinessLaboratoryDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.param.BusinessLaboratoryListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.param.BusinessLaboratoryUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统化验所
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】laboratory management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessLaboratoryCloudServiceFallback.class)
@RequestMapping("/business/laboratory")
public interface BusinessLaboratoryCloudService {

    // 查询化验所列表
    @ApiOperation(value = "Query Business Laboratory List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.BusinessLaboratoryCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessLaboratoryListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business Laboratory List", dataType = "BusinessLaboratoryListCloudParam", dataTypeClass = BusinessLaboratoryListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessLaboratoryListCloudDto list(BusinessLaboratoryListCloudParam param);

    // 创建化验所
    @ApiOperation(value = "Create Business Laboratory", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.BusinessLaboratoryCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Business Laboratory", dataType = "BusinessLaboratoryCreateCloudParam", dataTypeClass = BusinessLaboratoryCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessLaboratoryCreateCloudParam param);


    // 编辑化验所
    @ApiOperation(value = "Update Business Laboratory", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.BusinessLaboratoryCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Business Laboratory", dataType = "BusinessLaboratoryUpdateCloudParam", dataTypeClass = BusinessLaboratoryUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessLaboratoryUpdateCloudParam param);


    // 删除化验所
    @ApiOperation(value = "Delete Business Laboratory", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.laboratory.BusinessLaboratoryCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Business Laboratory", dataType = "BusinessLaboratoryDeleteCloudParam", dataTypeClass = BusinessLaboratoryDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessLaboratoryDeleteCloudParam param);

}
